// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import Loading from './components/loading'
import store from './store/store'
import axios from 'axios'
import VueAxios from 'vue-axios'
import Vant from 'vant'
import 'vant/lib/index.css'
import Mint from 'mint-ui'
import 'mint-ui/lib/style.css'
import ElementUI from 'element-ui'
import preview from 'vue-photo-preview'
import 'vue-photo-preview/dist/skin.css'
import rightMenu from 'rightmenu'
import VueParticles from 'vue-particles'





Vue.use(VueParticles);

Vue.use(rightMenu);

Vue.use(preview);

Vue.use(ElementUI);
Vue.use(Mint);
import './assets/less/app.less'
import {Format} from './common/js/time.js'

import YDUI from 'vue-ydui';
import 'vue-ydui/dist/ydui.rem.css';
import 'vue-ydui/dist/ydui.base.css';
import 'lib-flexible'

Vue.use(YDUI);

// import { Datetime, Group } from 'vux'
// Vue.component(Datetime.name, Datetime);
// Vue.component(Group.name, Group);
import i18n from './lang'

Vue.use(ElementUI, {
  size: 'medium',
  i18n: (key, value) => i18n.t(key, value)
})

import vuePicturePreview from 'vue-picture-preview'

Vue.use(vuePicturePreview)

Vue.use(VueAxios, axios)
Vue.use(Loading);
Vue.use(Vant);
Vue.filter('dateFmt', (time, fmt) => {
  return Format(time, fmt)
})
// 路由中文命名（就是在浏览器上显示是哪个页面）
router.beforeEach((to, from, next) => {
  window.document.title = to.meta.title;
  next()
})
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  i18n,
  template: '<App/>',
  components: {App}
})
